package user

import org.apache.shiro.crypto.hash.Sha256Hash

/**
 * AdminService
 * A service class encapsulates the core business logic of a Grails application
 */
class AdminService {

    static transactional = true

    def create() {
		String username
		String passwordHash
		def admin = new Admin(username: "admin", passwordHash: new Sha256Hash("admin").toHex())
		admin.addToPermissions("*:*")
		return admin.save(flush: true)
    }
}
